package com.jsu.collegestudentadmissionsystem.controller;

import com.jsu.collegestudentadmissionsystem.pojo.vo.CollegeMajorInformation;
import com.jsu.collegestudentadmissionsystem.service.AcademyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.util.List;
import java.util.Scanner;

@Controller
public class AcademyController {
    @Autowired
    AcademyService academyService;


    private void insertMajorInformation() {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
//        sc.close();
        String [] mid = str.split(" ");
        academyService.insertMajorInformation(mid[0],mid[1],mid[2],mid[3]);
    }

    private void queryMajorInformation() {
         academyService.queryMajorInformation();
    }

    private void selectiveAdmission() {
        academyService.selectiveAdmission();
    }

    public void dispatch(Integer operation) {
        switch (operation){
            case 1 :
                insertMajorInformation(); break;
            case 2 :
                System.out.println("还没写嘻嘻嘻"); break;
            case 3 :
                System.out.println("还没写嘻嘻嘻"); break;
            case 4 :
                queryMajorInformation(); break;
            case 5 :
                selectiveAdmission(); break;
            case 6 :
                System.out.println("还没写嘻嘻嘻"); break;
            case 7 :
                System.out.println("还没写嘻嘻嘻"); break;
            default:
                System.out.println("指令错误请重新输入");
                break;
        }
    }




}

